From 59d0a0335d7c199d5b680b63521c0ebaadb4c850 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 3 Mar 2006 10:56:54 +0100 Subject: [PATCH] This patch undoes 8697 and makes xm reboot/shutdown work again. This code does expose a bug in xenstored when it is killed & restarted, but that is not caused by this code. My sincere appology to Ke Yu for the long wait and assuming his code was broken. His code was perfectly fine. Its just that my test scripts did something for a historical reason that I should have removed a long time ago. Signed-Off-By: Leendert van Doorn --- tools/python/xen/xend/server/blkif.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/python/xen/xend/server/blkif.py b/tools/python/xen/xend/server/blkif.py index 23135aa08b..02cd4f26f7 100644 --- a/tools/python/xen/xend/server/blkif.py +++ b/tools/python/xen/xend/server/blkif.py @@ -42,10 +42,6 @@ class BlkifController(DevController): """@see DevController.getDeviceDetails""" dev = sxp.child_value(config, 'dev') - if 'ioemu:' in dev: - return (None,{},{}) - - devid = blkif.blkdev_name_to_number(dev) (typ, params) = string.split(sxp.child_value(config, 'uname'), ':', 1) back = { 'dev' : dev, @@ -54,7 +50,13 @@ class BlkifController(DevController): 'mode' : sxp.child_value(config, 'mode', 'r') } - front = { 'virtual-device' : "%i" % devid } + if 'ioemu:' in dev: + (dummy, dev1) = string.split(dev, ':', 1) + devid = blkif.blkdev_name_to_number(dev1) + front = {} + else: + devid = blkif.blkdev_name_to_number(dev) + front = { 'virtual-device' : "%i" % devid } return (devid, back, front) -- 2.30.2